home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
varia
/
egebook.lha
/
ege.book
/
5
/
Student.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-06-05
|
788b
|
33 lines
#include "Student.h"
#include "Collection.h"
#include "Schedule.h"
Collection* Student::Body = new Collection;
void Student::maintain() {
String selection;
while (TRUE) {
cout << "register (r) for course or maintain (m) ? ";
cin >> selection;
if (selection.contains("r"))
signup();
else if (selection.contains("m")) {
cout << "student is registered for these courses:\n";
taking->maintain();
} else
break;
};
}
void Student::signup() {
Example *sel_schedule, *sel_course;
cout << "select a semester:\n";
if ((sel_schedule = Schedule::All->select()) != NULL) {
cout << "select which course:\n";
if ((sel_course = sel_schedule->select()) != NULL) {
taking->add(sel_course);
sel_course->add(this);
};
};
}